var util = require('util');
function Basea() {
    this.name = 'base';
    this.basea = 1991; //内部创造的属性 跟function的名字是一样的
    this.sayHello = function() {
        console.log('Hello ' + this.name);
    };
}
Basea.prototype.showName = function() {
    console.log(this.name);
};
function Sub() {
    this.name = 'sub';
    this.base1 = 'base1';
}
util.inherits(Sub, Basea);
var objBase = new Basea();
objBase.showName();
objBase.sayHello();
console.log(objBase);
var objSub = new Sub();
objSub.showName();
//objSub.sayHello();
console.log(objSub);